Optimal. Leaf size=37 \[ \frac {a B \sin (c+d x)}{2 d}+\frac {a B \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {2813}
\begin {gather*} \frac {a B \sin (c+d x)}{2 d}+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2813
Rubi steps
\begin {align*} \int (a+a \cos (c+d x)) \left (-\frac {B}{2}+B \cos (c+d x)\right ) \, dx &=\frac {a B \sin (c+d x)}{2 d}+\frac {a B \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 29, normalized size = 0.78 \begin {gather*} \frac {a B (2 c+2 \sin (c+d x)+\sin (2 (c+d x)))}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 51, normalized size = 1.38
method | result | size |
risch | \(\frac {a B \sin \left (d x +c \right )}{2 d}+\frac {a B \sin \left (2 d x +2 c \right )}{4 d}\) | \(31\) |
norman | \(\frac {2 a B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) | \(32\) |
derivativedivides | \(\frac {2 a B \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a B \sin \left (d x +c \right )-a B \left (d x +c \right )}{2 d}\) | \(51\) |
default | \(\frac {2 a B \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a B \sin \left (d x +c \right )-a B \left (d x +c \right )}{2 d}\) | \(51\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 45, normalized size = 1.22 \begin {gather*} \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a - 2 \, {\left (d x + c\right )} B a + 2 \, B a \sin \left (d x + c\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 24, normalized size = 0.65 \begin {gather*} \frac {{\left (B a \cos \left (d x + c\right ) + B a\right )} \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs.
\(2 (32) = 64\).
time = 0.11, size = 87, normalized size = 2.35 \begin {gather*} \begin {cases} \frac {B a x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {B a x \cos ^{2}{\left (c + d x \right )}}{2} - \frac {B a x}{2} + \frac {B a \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {B a \sin {\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (B \cos {\left (c \right )} - \frac {B}{2}\right ) \left (a \cos {\left (c \right )} + a\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 30, normalized size = 0.81 \begin {gather*} \frac {B a \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {B a \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.63, size = 25, normalized size = 0.68 \begin {gather*} \frac {B\,a\,\left (2\,\sin \left (c+d\,x\right )+\sin \left (2\,c+2\,d\,x\right )\right )}{4\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________